# on Franklin, type the following commands: 
#  > module swap PrgEnv-pgi PrgEnv-cray/1.0.1
#  > module swap cce cce/7.3.2
#  > module load bupc
UPCC= upcc -O
CC = CC -O3

OS := $(shell uname -s)

ifeq ($(OS),Darwin)
	CC = g++ -O3
	UPCC = upcc -pthreads -O
endif

TARGETS= parallel code1 code2

all: $(TARGETS)

parallel: parallel.upc
	$(UPCC) -o $@ $^ $(DFLAGS)

code1: code1.upc
	$(UPCC) -o $@ $^ $(DFLAGS)

code2: code2.upc
	$(UPCC) -o $@ $^ $(DFLAGS)

clean:
	rm -f *.o $(TARGETS)
